/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.gac.stepmanager;

import java.util.LinkedList;
import org.gac.model.*;

/**
 *
 * @author Tomek
 */
public class StepManager {

    private LinkedList<StepCategory> _categories = new LinkedList<StepCategory>();


    public static final StepManager Instance = new StepManager();
    
    private StepManager()
    {
        
        StepCategory cat1 = new StepCategory( "Genetic steps" );
        cat1.add(new StepTypeWrapper( ExampleStep.class ));
        _categories.add( cat1 );

        StepCategory cat2 = new StepCategory( "Flow steps" );
        cat2.add(new StepTypeWrapper( SequenceStep.class ));
        cat2.add(new StepTypeWrapper( SplitStep.class ));
        cat2.add(new StepTypeWrapper( RepeatStep.class ));
        _categories.add( cat2 );
    }


    public void add( StepCategory wrapper )
    {
        _categories.add(wrapper);
    }

    public Object[] stepCategories()
    {
        return _categories.toArray();
    }
}
